﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MCK_Connect.ascx.cs" Inherits="ERP.Modules.MCK_Connect" %>
<%-------------------------------%>
<ext:Hidden ID="FormatTypeMCK" runat="server" />
<%--------------GridMCK-----------------%>
<ext:Panel runat="server" Layout="Fit" Border="False" ID="PanelMCK">
    <Content>
        <ext:Panel ID="Panel1" runat="server" PaddingSpec="10 10 10 10" Border="False">
            <Items>
                <ext:FieldSet ID="FieldSet1" runat="server" Title="Kết nối với thiết bị">
                    <Items>
                        <ext:TabPanel ID="TabPanelMCK"
                            runat="server"
                            Layout="Fit">
                            <Defaults>
                                <ext:Parameter Name="bodyPadding" Value="10" Mode="Raw" />
                                <ext:Parameter Name="autoScroll" Value="true" Mode="Raw" />
                            </Defaults>
                            <Items>
                                <ext:Panel ID="pnTCP_IP"
                                    runat="server"
                                    Title="TCP/IP"
                                    AutoDataBind="true"
                                    Frame="True"
                                    Layout="HBox"
                                    Border="False">
                                    <LayoutConfig>
                                        <ext:HBoxLayoutConfig Align="Middle" DefaultMargins="5" />
                                    </LayoutConfig>
                                    <Items>
                                        <ext:TextField ID="txtIP" runat="server" FieldLabel="IP" LabelWidth="30" MarginSpec="0 10 0 0" Text="192.168.1.201" AllowBlank="False" />
                                        <ext:TextField ID="txtPort" runat="server" FieldLabel="Port" LabelWidth="30" MarginSpec="0 30 0 0" Text="4370" AllowBlank="False" />
                                        <ext:Button ID="btnConnect" runat="server" Text="Connect" Scale="Medium">
                                            <DirectEvents>
                                                <Click OnEvent="btnConnect_OnClick">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:Button ID="btnDisConect" runat="server" Text="DisConnect" Scale="Medium" Hidden="True">
                                            <DirectEvents>
                                                <Click OnEvent="btnDisConect_OnClick">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel ID="pnRS232_485"
                                    runat="server"
                                    Title="RS232/485"
                                    AutoDataBind="true"
                                    Frame="True"
                                    Layout="HBox"
                                    Border="False">
                                    <LayoutConfig>
                                        <ext:HBoxLayoutConfig Align="Middle" DefaultMargins="5" />
                                    </LayoutConfig>
                                    <Items>
                                        <ext:SelectBox ID="cbPort" runat="server" FieldLabel="Port" LabelWidth="50" MarginSpec="0 10 0 0">
                                            <Items>
                                                <ext:ListItem Text="COM1" />
                                                <ext:ListItem Text="COM2" />
                                                <ext:ListItem Text="COM3" />
                                                <ext:ListItem Text="COM4" />
                                                <ext:ListItem Text="COM5" />
                                                <ext:ListItem Text="COM6" />
                                                <ext:ListItem Text="COM7" />
                                                <ext:ListItem Text="COM8" />
                                                <ext:ListItem Text="COM9" />
                                            </Items>
                                        </ext:SelectBox>
                                        <ext:SelectBox ID="cbBaudRate" runat="server" FieldLabel="BaudRate" LabelWidth="50" MarginSpec="0 10 0 0">
                                            <Items>
                                                <ext:ListItem Text="1200" />
                                                <ext:ListItem Text="2400" />
                                                <ext:ListItem Text="4800" />
                                                <ext:ListItem Text="9600" />
                                                <ext:ListItem Text="19200" />
                                                <ext:ListItem Text="38400" />
                                                <ext:ListItem Text="115200" />
                                            </Items>
                                        </ext:SelectBox>
                                        <ext:TextField ID="txtMachineSN" runat="server" FieldLabel="MachineSN" LabelWidth="60" MarginSpec="0 10 0 0" Text="1" AllowBlank="False" />
                                        <ext:Button ID="btnRsConnect" runat="server" Text="Connect" Scale="Medium">
                                            <DirectEvents>
                                                <Click OnEvent="btnRsConnect_OnClick">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:Button ID="btnRsDisConnect" runat="server" Text="DisConnect" Scale="Medium" Hidden="True">
                                            <DirectEvents>
                                                <Click OnEvent="btnRsDisConnect_OnClick">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel ID="pnUsbClient"
                                    runat="server"
                                    Title="UsbClient"
                                    AutoDataBind="true"
                                    Frame="True"
                                    Layout="HBox">
                                    <LayoutConfig>
                                        <ext:HBoxLayoutConfig Align="Middle" DefaultMargins="5" />
                                    </LayoutConfig>
                                    <Items>
                                        <ext:TextField ID="txtMachineSN2" runat="server" FieldLabel="MachineSN" FieldStyle="color:blue;" LabelWidth="60" MarginSpec="0 10 0 0" Text="1" AllowBlank="False" />
                                        <ext:Button ID="btnUSBConnect" runat="server" Text="Connect" Scale="Medium">
                                            <DirectEvents>
                                                <Click OnEvent="btnUSBConnect_OnClick">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:Button ID="btnUSBDisConnect" runat="server" Text="DisConnect" Scale="Medium" Hidden="True">
                                            <DirectEvents>
                                                <Click OnEvent="btnUSBDisConnec_OnClick">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:TabPanel>
                    </Items>
                </ext:FieldSet>
                <ext:FieldSet ID="FieldSet2" runat="server" Title="Lịch sử">
                    <Items>
                        <ext:GridPanel ID="GridView1" runat="server" Cls="grid-double" Border="False">
                            <Store>
                                <ext:Store ID="StoreMCK" runat="server" PageSize="11">
                                    <Model>
                                        <ext:Model ID="ModelMCK" runat="server">
                                            <Fields>
                                                <ext:ModelField Name="MCK_EnrollNumber" />
                                                <ext:ModelField Name="MCK_Date" Type="Date" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <ColumnModel runat="server">
                                <Columns>
                                    <ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Text="STT" Width="30" Align="Center" />
                                    <ext:Column ID="Column2" runat="server" Text="EnrollNumber" Width="100" DataIndex="MCK_EnrollNumber"></ext:Column>
                                    <ext:DateColumn ID="Column7" runat="server" Text="Ngày" Width="90" DataIndex="MCK_Date" Format="dd-MM-yyyy"></ext:DateColumn>
                                    <ext:DateColumn ID="DateColumn1" runat="server" Text="Giờ" Width="90" DataIndex="MCK_Date" Format="HH:mm" Flex="1"></ext:DateColumn>
                                </Columns>
                            </ColumnModel>
                            <DockedItems>
                                <ext:Toolbar ID="Toolbar1" runat="server" Dock="Top" AnchorHorizontal="100%">
                                    <Items>
                                        <ext:Button ID="btnDowloadAttLogs" runat="server" Text="Download" Icon="ComputerGo">
                                            <DirectEvents>
                                                <Click OnEvent="btnDowloadAttLogs_OnClick">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Toolbar>
                                <ext:Toolbar ID="ToolbarPagging" runat="server" Dock="Bottom" AnchorHorizontal="100%">
                                    <Items>
                                        <ext:PagingToolbar ID="PagingToolbarBank" runat="server" StoreID="StoreMCK" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                                    </Items>
                                </ext:Toolbar>
                            </DockedItems>
                        </ext:GridPanel>
                    </Items>
                </ext:FieldSet>
            </Items>
        </ext:Panel>
    </Content>
</ext:Panel>
